import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/vue-admin-template/table/list',
    method: 'get',
    params
  })
}

// 实时工单汇总信息api
export function gettaskReportInfo({ start, end }) {
  return request.get(`/task-service/task/taskReportInfo/${start}/${end}`)
}

// 销售统计api  订单数、销售额
export function getOrderCount(params) {
  return request({
    url: '/order-service/report/orderCount',
    params
  })
}
export function getOrderAmount(params) {
  return request({
    url: '/order-service/report/orderAmount',
    params
  })
}

// 商品热榜
export function getSkuTopList({ size, start, end }) {
  return request.get(`/order-service/report/skuTop/${size}/${start}/${end}`)
}

// 销售图表数据api
// 折线图
export function getAmountCollect({ type, start, end }) {
  return request.get(`/order-service/report/amountCollect/${type}/${start}/${end}`)
}

// 柱状图
export function getRegionCollect({ start, end }) {
  return request.get(`/order-service/report/regionCollect/${start}/${end}`)
}

// 获取点位数
export function getNodeCount() {
  return request.get('/vm-service/node/count')
}

// 获取合作商总数
export function getPartnerCount() {
  return request.get('/user-service/partner/count')
}

// 合作商点位汇总统计
export function getNodeCollect() {
  return request.get('/vm-service/node/nodeCollect')
}
